﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/management.Master" AutoEventWireup="true" CodeBehind="password.aspx.cs" Inherits="pcsse.management.password" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="hoder_sidebar" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="hoder_maincontent" runat="server">
<div class="p_title">
修改密码
</div>
    <asp:DetailsView ID="pDv" runat="server" AutoGenerateRows="False" 
        DataKeyNames="ID" DataSourceID="pDvOds" DefaultMode="Edit" Height="50px" 
        onitemupdating="pDv_ItemUpdating" Width="300px">
        <FieldHeaderStyle Width="100px" />
        <EmptyDataTemplate>
            <asp:Label ID="emptyLb" runat="server" Text="请先登录"></asp:Label>
        </EmptyDataTemplate>
        <Fields>
            <asp:TemplateField HeaderText="学号" SortExpression="NUMBER">
                <EditItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("NUMBER") %>'></asp:Label>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("NUMBER") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="原始密码">
                <EditItemTemplate>
                    <asp:TextBox ID="prepasswordTb" runat="server" Height="20px" 
                        TextMode="Password" Width="150px"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="新密码" SortExpression="PASSWORD">
                <EditItemTemplate>
                    <asp:TextBox ID="newpasswordTb" runat="server" Height="20px" 
                        Text='<%# Bind("PASSWORD") %>' TextMode="Password" Width="150px"></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("PASSWORD") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="重复新密码">
                <EditItemTemplate>
                    <asp:TextBox ID="repeatnewTb" runat="server" Height="20px" TextMode="Password" 
                        Width="150px"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowEditButton="True" />
        </Fields>
    </asp:DetailsView>
    <asp:ObjectDataSource ID="pDvOds" runat="server" DeleteMethod="Delete" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByID" 
        TypeName="managementTableAdapters.T_LOGINTableAdapter" 
        UpdateMethod="Update" onselecting="pDvOds_Selecting">
        <DeleteParameters>
            <asp:Parameter Name="Original_ID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="NUMBER" Type="String" />
            <asp:Parameter Name="PASSWORD" Type="String" />
            <asp:Parameter Name="Original_ID" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:SessionParameter DefaultValue="" Name="Original_ID" SessionField="ID" 
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:Label ID="errLb" runat="server"></asp:Label>
</asp:Content>
